<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<style>
</style>
<script type="text/javascript">
	var processTypetreegridSelect;
	$(function() {
		processTypetreegridSelect = $('#processTypetreegridSelect').treegrid({
			url : '${path }/processType/treeGrid',
			idField : 'id',
			treeField : 'name',
			singleSelect:${!flag},
			parentField : 'pid',
			fit : true,
			fitColumns : false,
			border : false,
			frozenColumns : [ [ {
				title : 'id',
				field : 'id',
				width : 40,
				hidden : true
			} ] ],
			columns : [ [ {
				width : '100',
				title : '名称',
				field : 'name'
			}, {
                width : '100',
                title : '部署ID',
                field : 'deploymentId'
            },{
				width : '100',
				title : '流程定义ID',
				field : 'procdefid'
			}, {
				width : '100',
				title : 'key值',
				field : 'key'
			}, {
				width : '100',
				title : '图标',
				field : 'iconCls'
			}, {
				width : '100',
				title : '排序',
				field : 'seq'
			}, {
				width : '100',
				title : '版本',
				field : 'version'
			}, {
				field : 'pid',
				title : '上级资源ID',
				width : 150,
				hidden : true
			} ] ],
			onLoadSuccess : function(data) {

			},
			toolbar : '#processTypeSelectToolbar'
		});
	});

	function cleanprocessTypeSelectFun() {
		$('#searchProcesstypeSelect')[0].reset();
		processTypetreegridSelect.treegrid('load', {});
	}

	function searchprocessTypeSelectFun() {
		processTypetreegridSelect.treegrid('load', $
				.serializeObject($('#searchProcesstypeSelect')));
	}
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false"
		style="overflow: hidden;">
		<table id="processTypetreegridSelect"></table>
	</div>
	<div id="processTypeSelectToolbar" style="display: none;">
		<form id="searchProcesstypeSelect">
			<table>
				<tr>
					<td>名称</td>
					<td><input type="text" name="name" class="easyui-text" /> <a
						href="javascript:void(0);" class="easyui-linkbutton"
						data-options="iconCls:'fi-magnifying-glass',plain:true"
						onclick="searchprocessTypeSelectFun();">查询</a> <a
						href="javascript:void(0);" class="easyui-linkbutton"
						data-options="iconCls:'fi-x-circle',plain:true"
						onclick="cleanprocessTypeSelectFun();">清空</a></td>
				</tr>
			</table>
		</form>
	</div>
</div>

